package org.effdom.io;

import java.io.IOException;
import java.io.InputStream;

import org.effdom.Document;

public interface DocumentReader {

    /**
     * Reads and parse an <code>Document</code> from the specified
     * <code>InputStream</code>.
     * 
     * @param stream
     *            the stream from which the <code>Document</code> shall be
     *            read
     * @return the parsed <code>Document</code>
     * @throws IOException
     * @throws IllegalArgumentException
     */
    public Document read(InputStream stream) throws IOException, IllegalArgumentException;
}
